package com.ykht.proj.coupon.Enum;

/**
 * 是否展示0是1否
 */
public enum BrandFxSwitchTypeEnum {
	RUNNING(0,"开启"),
	FINISHED(1,"已关闭"),
	WAITING(2,"待开始");
	private Integer value;
	private String desc;

	BrandFxSwitchTypeEnum(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}


	/**
	 * 根据val值获取desc
	 * @param val 1、0
	 * @return
	 */
	public static String getDescByVal(Integer val) {
		BrandFxSwitchTypeEnum[] values = BrandFxSwitchTypeEnum.values();
		for (BrandFxSwitchTypeEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}
	public static BrandFxSwitchTypeEnum getThisByVal(Integer val) {
		BrandFxSwitchTypeEnum[] values = BrandFxSwitchTypeEnum.values();
		for (BrandFxSwitchTypeEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe;
			}
		}
		return null;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	}
